#ifndef TOUCH_TRACKER_H
#define TOUCH_TRACKER_H

#ifdef __cplusplus
extern "C" {
#endif

#include "lv_drv_conf.h"

#include <stdbool.h>
#include "lvgl/src/lv_hal/lv_hal_indev.h"
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#if USE_TOUCH_TRACKER
typedef unsigned char BOOL;

#define TOUCH_TRACKER_DOWN    0
#define TOUCH_TRACKER_UP      1

typedef struct {
    uint16_t x;
    uint16_t y;
    uint8_t width;
    uint8_t sub_status;
} touch_tracker_data;

typedef struct {
    touch_tracker_data data;
} touch_tracker_dev_info;

int touch_tracker_init(void);
void touch_tracker_Suspend(void *arg);
void touch_tracker_Resume(void *arg);
void touch_tracker_record(void *data);
void touch_tracker_set_data(void *data);
touch_tracker_data touch_tracker_get_data(void);
bool touch_tracker_read(lv_indev_drv_t * indev_drv, lv_indev_data_t *data);

void touch_tracker_record_on(uint8_t isShell);
void touch_tracker_record_off(void);
bool touch_tracker_is_recording(void);

void touch_tracker_play_on(char *file);
void touch_tracker_play_off(void);
bool touch_tracker_is_playing(void);

#endif /* USE_TOUCH_TRACKER */

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
